<?php
Globals::requireClass('Table');

class VlevelTable extends Table
{
	public static $defaultConfig = array(
		'table' => 'tb_vlevel'
	);
	
	public function getUserVlevelCount($uid){
	    $uid = (int)$uid;
	    $sql = "select SUM(level) as money from tb_vlevel where uid = {$uid} ";
	    $this->database->query($sql);
	    $re = $this->database->fetch();
	    return $re['level'];
	}
}

Config::extend('VlevelTable', 'Table');
